package org.semanticflash.rdf.graph.redirection
{
	import org.semanticflash.rdf.utils.AbstractRDFTest;

	public class RDFTripleRedirectionTest extends AbstractRDFTest
	{

		
		
		public function testMisc( ):void
		{
			
			var ctx:RDFRedirectionContext = new RDFRedirectionContext( );
			
			var rabc:RDFTripleRedirection = ctx.getTripleRedirection( triple("abc") );
			var rdbc:RDFTripleRedirection = ctx.getTripleRedirection( triple("dbc") );
			var rxbc:RDFTripleRedirection = ctx.getTripleRedirection( triple("xbc") );


				// each one points to itself			
				assertEquals( rabc.target, triple("abc") );
				assertEquals( rdbc.target, triple("dbc") );
				assertEquals( rxbc.target, triple("xbc") );
			
			ctx.eq( iri("a"), iri("x") );
			
				assertEquals( rabc.target, rxbc.target );
				assertEquals( rdbc.target, triple("dbc") );

			ctx.eq( iri("x"), iri("d") );

				assertEquals( rabc.target, rxbc.target );
				assertEquals( rdbc.target, rxbc.target );
						
			ctx.neq( iri("a"), iri("x") );
			
				assertEquals( rabc.target, triple("abc") );
				assertEquals( rdbc.target, rxbc.target );
				
			
			
								
		
		}



	}

}